package com.zmh.service.time.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.zmh.common.DateUtil;
import com.zmh.service.http.IamtopNotesHttp;
import com.zmh.service.http.RedmineHttp;
import com.zmh.service.msg.MailService;

/** 
 * 邮件定时发送任务
 * @author zhoumh
 * @version 创建时间：2018年7月16日 上午9:01:16 
 * @Description 
*/
@DisallowConcurrentExecution
public class SendMailTimer extends QuartzJobBean  {
	private static Logger logger = LoggerFactory.getLogger(SendMailTimer.class);
	@Autowired
	private MailService mailService;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//    	logger.info("邮件发送任务开始");
        try {
        	mailService.sendMail();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
//        logger.info("邮件发送任务结束");
    }
}
